signed int si_round(double d);
+#if _MSC_VER
+//These functions are not included in the MS pre C99 implementation, use internal implementation
+//This asssumes that non-_MSC_VER includes math.h (all should include defs.h)
+#define round si_round
+#define lround si_round
+#endif
+
/*
* Data types for Palm/OS files.
*/
#include <string.h>
#include <math.h> /* for lat/lon conversion */
-#if defined(_MSC_VER)
-//Incomplete implementation, use existing GB function
-#define lround si_round
-#endif
-
typedef struct lowranceusr_icon_mapping {
const int value;
const char* icon;
#include <math.h> /* for lat/lon conversion */
#include <time.h> /* for gmtime */
-#if defined(_MSC_VER)
-//Incomplete implementation, use existing GB function
-#define round si_round
-#endif
-
/* from waypt.c, we need to iterate over waypoints when extracting
routes */
extern queue waypt_head;